<?php session_start();

 include('SVsystem/config/dbconfig.php');
 include('SVsystem/class/tools.php'); 
 
 $datos = new tools();
 $datos->autoconexion();
 
 
		switch ($_POST['tipo']) {
		
			case 0: //editar codigo
			   
				$datos->query("update banner set cliks = cliks+1 where id = '{$_POST['id']}'");
			    break;
			   
			case 1: //editar codigo
			   
				$datos->query("update banner set views = views+1 where id = '{$_POST['id']}'");
			    break;   
			   						   
		}

 
$datos->cerrar();

?>
